import { Injectable, NestMiddleware } from "@nestjs/common";
import { Request, Response, NextFuntion } from "express";

@Injectable()
export class AuthMiddleware implements NestMiddleware {
  use(req: Request, res: Response, next: NextFuntion) {
    console.log("AuthMiddleware");
    req.user = { id: 1, name: "nick", role: req.query.role };
    next();
  }
}
